import { storeBindingsBehavior } from 'mobx-miniprogram-bindings'
import member from "@src/store/member";
import base from "@src/store/base";
import router from "@src/router";

Component({
  behaviors: [storeBindingsBehavior, router.routerBehavior],
  storeBindings: [{
    store: member,
    fields: ['isMember', 'memberName', 'categoryName', 'categoryImage', 'wxName'],
    actions: ['getBaseInfo'],
  }, {
    store: base,
    fields: ['businessName', 'businessLogo', 'features', 'homeBanners', 'services'],
  }],
  properties: {
    login: {
      type: Boolean,
      value: false
    },
    cardImg: String
  },
  data: {},
  methods: {
    handleLogin() {
      console.info("this.triggerEvent('login')")
      this.triggerEvent('login')
    },
    openRecommendService() {
      console.log("openRecommendService")
      this.selectComponent('#recommendService').fetchData()
    }
  }
})
